<template name="Auth_page">
  <nav>
    <div class="container">
      <div class="nav-wrapper">

      </div>
    </div>
  </nav>

  <section class="section section-daily-stats center">
      {{> atForm}}
  </section>


<script charset="utf-8">
  // HIDE EVERYTHING ON OPEN
  $(".section").hide();
  setTimeout(() => {
    $(document).ready(() => {

      // SHOW HIDDEN SECTIONS
      $(".section").fadeIn();
      // SIDE DRAWER
      $(".button-collapse").sideNav();

      Materialize.updateTextFields();

    });
  }, 1000);

</script>

</template>

<template name="override-atPwdFormBtn">
  <button type="submit" class="btn-primary">
    {{buttonText}}
  </button>
</template>

<template name="override-atTextInput">
  <div class="input {{#if isValidating}}validating{{/if}} {{#if hasError}}error{{/if}} {{#if hasSuccess}}has-success{{/if}} {{#if feedback}}has-feedback{{/if}}">
    <input type="{{type}}" id="at-field-{{_id}}" name="at-field-{{_id}}" placeholder="{{placeholder}}" autocapitalize="none" autocorrect="off">
    {{#if hasIcon}}
        <span class="{{iconClass}}"></span>
    {{/if}}
    {{#if hasError}}
      <span>{{errorText}}</span>
    {{/if}}
  </div>
</template>

<template name="override-atTitle">
  <h1 class="title-auth">{{title}}</h1>
  <p class="subtitle-auth">{{_ 'useraccounts.atTitle.subtitle'}}</p>
</template>

<template name="override-atError">
  <div class="list-errors">
    {{#each error}}
      <div class="list-item red">{{errorText}}</div>
    {{/each}}
  </div>
</template>

<template name="override-atPwdForm">
  <div class="container">
      <form role="form" id="at-pwd-form" class="col s12 {{disabled}}" novalidate action="#" method="POST">
        {{#each fields}}
          <div class="input-field col s6 ">
            {{> atInput}}
          </div>
        {{/each}}
        {{#if showReCaptcha}}
          {{> atReCaptcha}}
        {{/if}}
        {{> atPwdFormBtn}}
        {{#if showForgotPasswordLink}}
          {{> atPwdLink}}
        {{/if}}
      </form>
  </div>

</template>
